<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>undulateTest</title>
    <style>
        body {
            height: 100%;
            margin: 0px;
            background-color: aquamarine;
        }

        .fontScalein_box {
            position: absolute;
            top: 100px;
            left: 500px;
        }

        .fontScalein_box span {
            display: inline-block;
            font-size: 25px;
            transform: scale(0, 0);
        }

        .fontScalein_btn {
            position: absolute;
            top: 150px;
            left: 500px;
            height: 30px;
        }
    </style>
</head>

<body>
    <div class="fontScalein_box">
        <span>字</span>
        <span>体</span>
        <span>缩</span>
        <span>放</span>
        <span>出</span>
        <span>现</span>
    </div>
    <button class="fontScalein_btn">点击字体缩放出现</button>


    <script type="text/javascript" src="../src/tatu.js"></script>
    <script>
        const fontScaleinBox = document.querySelector('.fontScalein_box');
        const fontScaleinSpans = fontScaleinBox.querySelectorAll('span');
        const fontScaleinBtn = document.querySelector('.fontScalein_btn');

        /*  fontScalein(): 字体缩放出现动画---参数说明:
            参数一: htmlElementArray: 需要操作的html元素数组
            参数二: callback: 可选，动画完成后的回调函数
        */

        fontScaleinBtn.addEventListener('click', () => {
            fontScalein(fontScaleinSpans, () => {
                console.log('ok');
            });
        })
    </script>
</body>

</html>